home *** CD-ROM | disk | FTP | other *** search
- [DESCRIPTION]Inserts the current date anywhere on a page.[/DESCRIPTION]
-
- [HEAD CODE]<SCRIPT LANGUAGE="JavaScript">
- <!--
- function InsertDate(){
- thedate = new Date();
- theday = thedate.getDay();
- themonth = thedate.getMonth();
- theweekday= thedate.getDate();
- weekday= theweekday;
- theyear= thedate.getYear();
- year = theyear
-
- if(theday == 0)
- day = "Sunday"
- else if(theday == 1)
- day = "Monday"
- else if(theday == 2)
- day = "Tuesday"
- else if(theday == 3)
- day = "Wednesday"
- else if(theday == 4)
- day = "Thursday"
- else if(theday == 5)
- day = "Friday"
- else if(theday == 6)
- day = "Saturday"
-
- if(themonth == 0)
- month = "January"
- else if(themonth ==1)
- month = "February"
- else if(themonth ==2)
- month = "March"
- else if(themonth ==3)
- month = "April"
- else if(themonth ==4)
- month = "May"
- else if(themonth ==5)
- month = "June"
- else if(themonth ==6)
- month = "July"
- else if(themonth ==7)
- month = "August"
- else if(themonth ==8)
- month = "September"
- else if(themonth ==9)
- month = "October"
- else if(themonth ==10)
- month = "November"
- else if(themonth ==11)
- month = "December"
-
- document.write(day +", " +month + " ");
- document.write(theweekday +", " +theyear);}
- -->
- </SCRIPT>[/HEAD CODE]
-
- [BODY CODE]<SCRIPT LANGUAGE="JavaScript">InsertDate();</SCRIPT>[/BODY CODE]
-
- [NOTES]Place the Body code where you want the date to be inserted.[/NOTES]